<?php
/*
 * 行情列表页
 * @package    auto
 * @author     WL
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 28ba74956e414c0c1fbddbb5cff31733a5a69975 $
 */
defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE . '/' . $module . '/common.inc.php';

$headerPart = 'quote';
require_once MD_ROOT . '/header.inc.php';

$pn = new Pagination();

$quoteCategory = AutoQuote::category();

$table     = Table::name(Table::NAME_QUOTE);
$pagesize  = 3;

$condition = " arcid=$carid";
if (isset($catid) && $catid != 0) $condition .= " and catid=$catid";
if (isset($cityid) && $cityid != 0) $condition .= " and areaid IN (".$AREA[$cityid]['arrchildid'].")";




$items = $db->count(Table::name(Table::NAME_QUOTE), $condition);

$pn->records($items);
$pn->padding(false);
$pn->recordsPerPage($pagesize);

$limitSql .= " LIMIT " . ($pn->getPage() - 1) * $pagesize . ',' . $pagesize;
$sql = "select itemid,title,introduce,addtime,linkurl,hits,areaid from $table where $condition order by addtime desc $limitSql";
$gulidSummary = $db->getAll($sql);


include template('quoteList', $module);













